import Vue from 'vue'
import Cookies from 'js-cookie'
import Vant from 'vant';
import 'vant/lib/index.css';
import App from './App'
import store from './store'
import router from './router'
import 'lib-flexible/flexible.js'
import './iconfont/iconfont.js'
import './iconfont/iconfont.css'
import './css/index.css'
import VueLazyload from 'vue-lazyload'
// 图片懒加载
Vue.use(VueLazyload, {
    loading: require('./assets/loading.gif'), //加载中图片，一定要有，不然会一直重复加载占位图
    error: require('./assets/error.jpg') //加载失败图片
});
Vue.prototype.msgSuccess = function (msg) {
    this.$message({
        showClose: true,
        message: msg,
        type: 'success'
    })
}

Vue.prototype.msgError = function (msg) {
    this.$message({
        showClose: true,
        message: msg,
        type: 'error'
    })
}

Vue.prototype.msgInfo = function (msg) {
    this.$message.info(msg)
}

// 全局组件挂载
Vue.use(Vant);

new Vue({
    el: '#app',
    router,
    store,
    render: h => h(App)
})